package com.sui.bigdata.flink.sql.core.util;

/**
 * @author YongChen
 * @date 2019/11/21 14:11
 * @description
 * @email yong_chen@sui.com
 */
public final class Preconditions {

    public static void checkNotBlank(String str,String errorMessage) {
        if ( null == str || "".equals(str)) {
            throw new NullPointerException(String.valueOf(errorMessage));
        }
    }

    public static void checkState(boolean condition,String errorMessage) {
        if (condition) {
            throw new IllegalStateException(String.valueOf(errorMessage));
        }
    }

}
